﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master"
    AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="Jzy.Web.Project.BugManage.Edit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script src="../../Common/Js/calendar.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Common/Js/attach.js"></script>

    <style type="text/css">
        .style1
        {
            text-align: right;
            padding-right: 10px;
            height: 30px;
            width: 100px;
        }
        .style2 select
        {
            padding-right: 10px;
            width: 150px;
        }
        .style2 textarea
        {
            margin: 2px 0px 2px 0px;
        }
        #buttons input
        {
            height: 22px;
            margin-right: 10px;
            width: 60px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
   <div id="toolbar">
        <ul>
            <li><a id="lnkSave" runat="server" href="javascript:;"><span><b style="background-image: url(../../common/images/common/save.gif);
                width: 35px;">&nbsp;</b><asp:Literal ID="Literal7" runat="server" Text="保存"></asp:Literal></span></a></li>
            <li style="width:110px;"><a id="lnkSaveCreate" runat="server" href="javascript:;"><span><b style="background-image: url(../../common/images/common/save.gif);">
                &nbsp;</b>
                <asp:Literal ID="Literal8" runat="server" Text="保存并新建"></asp:Literal></span></a></li>
            <li><a id="lnkCancel" runat="server" href="javascript:;"><span><b style="background-image: url(../../common/images/common/return.gif);">
                &nbsp;</b>
                <asp:Literal ID="Literal9" runat="server" Text="取消"></asp:Literal></span></a></li>            
        </ul>
    </div>
    <asp:Panel ID="pnlMain" runat="server" Style="padding: 0px 20px 0px 20px;">
        <div style="padding-top: 15px; padding-left: 10px; font-weight: bold;">
            <img src="../../Common/Images/common/tb-add.gif" alt="" align="absmiddle" style="margin-right:5px;" id="imgTitle" runat="server" /><asp:Literal
                ID="litTitle" runat="server" Text="登记缺陷"></asp:Literal></div>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td style="height: 2px;">
                    <img src="../../Common/Images/Common/keyline.gif" alt="" style="height: 2px; width: 100%" />
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="style1">
                    <span style="color:Red">*</span>&nbsp;<asp:Literal ID="Literal1" runat="server" Text="项目名称："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:DropDownList ID="PrjID" runat="server" Width="322px" AutoPostBack="True" OnSelectedIndexChanged="PrjID_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal2" runat="server" Text="缺陷位置："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Name" runat="server" CssClass="txt" Width="280px"></asp:TextBox>
                    （相关默认为项目名称）
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <span style="color:Red">*</span>&nbsp;<asp:Literal ID="Literal3" runat="server" Text="严重性："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:DropDownList ID="Severity" runat="server" Width="130px">
                    </asp:DropDownList>
                    <span style="color:Red">*</span>&nbsp;<asp:Literal ID="Lit" runat="server" Text="优先级："></asp:Literal>
                    <asp:DropDownList ID="Priority" runat="server" Width="90px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <span style="color:Red">*</span>&nbsp;<asp:Literal ID="Literal4" runat="server" Text="缺陷类型："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:DropDownList ID="TypeCode" runat="server" Width="243px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal5" runat="server" Text="期望完成日期："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="PlanEndTime" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <span style="color:Red">*</span>&nbsp;<asp:Literal ID="Literal6" runat="server" Text="接收者："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ReceiveID" runat="server" Width="154px">
                            </asp:DropDownList>
                            <asp:CheckBox ID="chkMail" runat="server" Text="邮件提醒" />
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="PrjID" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <span style="color:Red">*</span>&nbsp;缺陷环境<br />
                    缺陷描述
                </td>
                <td class="style2">
                    <asp:TextBox ID="Remark" runat="server" CssClass="txt" Height="120px" TextMode="MultiLine"
                        Width="370px" MaxLength="500"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="Remark" Display="Dynamic" ErrorMessage="请输入缺陷描述"></asp:RequiredFieldValidator>
                    <br />
                    （500个字符以内，多余将被自动截取）
                </td>
            </tr>
            <tr>
                <td class="style1">图片：</td>
                <td class="style2">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td style="width: 80px">
                                <script type="text/javascript">
                                    new ImageUpload("fileList", "pic");
                                </script>
                            </td>
                            <td id="fileList" style="word-break: break-all; padding-left: 5px;">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr id="trImages" runat="server">
                <td class="style1"></td>
                <td class="style2">
                    <asp:Repeater ID="rptPicture" runat="server" OnItemCommand="rptPicture_ItemCommand">
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/common/images/Common/attach.gif" />&nbsp;<asp:HyperLink
                                ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("OriginImageAbsPath") %>' Text='<%# Eval("Name") %>'
                                Target="_blank"></asp:HyperLink>
                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/common/images/Common/delAttach.gif"
                                ImageAlign="AbsMiddle" CommandName="Delete" CommandArgument='<%#Eval("ID") %>'
                                OnClientClick="return confirm('确认删除图片?')" />;&nbsp;
                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </table>
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td style="height: 2px;">
                    <img src="../../Common/Images/Common/keyline.gif" alt="" style="height: 2px; width: 100%" />
                </td>
            </tr>
        </table>
        <div style="text-align: left; padding-left: 100px;" id="buttons">
            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
            <asp:Button ID="btnSaveCreate" runat="server" Text="保存并新建" Width="100px" 
                onclick="btnSaveCreate_Click" />
            <asp:Button
                ID="btnCancel" runat="server" Text="取消" onclick="btnCancel_Click" 
                CausesValidation="False" /></div>
    </asp:Panel>
</asp:Content>
